<?php

class Story_Form_Create_Tag extends Engine_Form
{

    public function init()
    {
        $user = Engine_Api::_()->user()->getViewer();
        $user_level = Engine_Api::_()->user()->getViewer()->level_id;
        
        $this->addElement('Text', 'extend_tags', array(
            //'label' => 'Tags (Keywords)',
            'autocomplete' => 'off',
            'description' => 'Tags (Keywords)',
            'filters' => array(new Engine_Filter_Censor(), ),
            ));
        $this->extend_tags->getDecorator("Description")->setOption("placement", "append");
        $this->extend_tags->removeDecorator('Label');

        
        $approval = (int)Engine_Api::_()->authorization()->getPermission($user_level,
            'story', 'approval');

        /* if ($approval) {
            if (!$this->_item) {
                $this->addElement('Radio', 'extend_published', array(
                    //'label' => 'Status',
                    'allowEmpty' => false,
                    'required' => true,
                    'multiOptions' => array("0" => "Saved As Draft"),
                    'value' => '0',
                    'description' => "Administrator will review and manually publish story once it is approved."));
                $this->extend_published->getDecorator('Description')->setOption('placement', 'prepend');
            }
        } else {
            if (!$this->_item || ($this->_item && !$this->_item->published)) {
                $this->addElement('Radio', 'extend_published', array(
                    //'label' => 'Status',
                    'allowEmpty' => false,
                    'required' => true,
                    'multiOptions' => array(                        
                        "1" => "Published",
                        "0" => "Saved As Draft"),
                    'value' => '0',
                    'description' => "If story is published, it cannot be switched back to draft mode."));
                $this->extend_published->getDecorator('Description')->setOption('placement', 'prepend');
            }
        }
        
        $this->extend_published->removeDecorator('Label'); */

    }

}
